<!doctype html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>demo1</title>
</head>
<body>

    <!-- th:if 条件成立就显示 -->
    <h1 th:if="${flag=='yes'}">小母牛吃旺仔牛逼糖</h1>

    <!-- th:unless 条件不成立就显示 -->
    <h1 th:unless="${flag=='no'}" >牛逼哄哄</h1>

    <!-- switch选择语句 -->
    <div th:switch="${menu}">
        <p th:case="admin">User is an administrator</p>
        <p th:case="${manager}">User is a manager</p>
    </div>
</body>
</html>
